<?php
class Exts_Models_Comments extends Exts_Db_Table_Abstract
{
    protected $_name = 'us_comments';
	protected $_primary = 'comment_id';

	public function save( $bind )
	{
		if(  ! $this->exists( $bind['comment'], $bind['move_id'], $bind['user_id'] )) {
			$row = $this->createRow( $bind );
			return $row->save();
		}
		throw new Exception( 'El comentario ya fue publicado');
		
	}
	
	public function exists( $comment, $movieId, $userId )
	{
		return false;
	}

}


